Find Minimum of Three Numbers

Theory:

To find the minimum of three numbers, we compare each number with the other two and return the smallest one.

Python Code:

def find_minimum(a, b, c):
    return min(a, b, c)

def find_and_display_minimum():
    a = float(input("Enter the first number: "))
    b = float(input("Enter the second number: "))
    c = float(input("Enter the third number: "))
    minimum = find_minimum(a, b, c)
    print("Minimum of the three numbers:", minimum)

find_and_display_minimum()

Example Output:

Enter the first number: 5

Enter the second number: 3

Enter the third number: 7

Minimum of the three numbers: 3.0

Code Explanation:

The function find_minimum(a, b, c) returns the minimum of three numbers using Python's built-in min() function.

The function find_and_display_minimum() takes input for three numbers, finds their minimum using the first function, and displays it.